package com.dzm.cart.config;

import com.dzm.cart.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 作者：Dzm
 * 时间：2024-09-18-15:01
 * 功能：
 */

@Configuration
public class DxgWebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        LoginInterceptor interceptor = new LoginInterceptor();
        registry.addInterceptor(interceptor).addPathPatterns("/**");
    }
}
